<template>
  <div>
    <div class="banner" @click="handleGallaryClick" >
      <img class="banner-img" src="//img1.qunarzz.com/sight/p0/1907/40/401b7b735008f7f4a3.img.jpg_600x330_d1fcb59f.jpg" alt="">
      <div class="banner-info">
        <div class="banner-title">西溪国家湿地公园·周家村(AAAAA景区)</div>
        <div class="banner-number">
          <span class="iconfont banner-icon">&#xe608;</span>11
        </div>
      </div>
    </div>
    <fade-animation>
      <common-gallary :imgs="imgs" v-show="isGallary" @closeGallary="gallaryClose"></common-gallary>
    </fade-animation>
  </div>
</template>
<script>
import CommonGallary from 'common/gallary/Gallary'
import FadeAnimation from 'common/fade/FadeAnimation'
export default {
  name: 'DetailBanner',
  data () {
    return {
      imgs: ['http://img1.qunarzz.com/sight/p0/1411/dc/c100d494e06c0e035af4259d6c0b1fe1.water.jpg_r_800x800_e32d5468.jpg', 'http://img1.qunarzz.com/sight/p0/1411/51/7c73d4f75f77f07a391877c55cba59eb.water.jpg_r_800x800_1cd1ab0e.jpg'],
      isGallary: false
    }
  },
  methods: {
    handleGallaryClick () {
      this.isGallary = true
    },
    gallaryClose () {
      this.isGallary = false
    }
  },
  components: {
    CommonGallary,
    FadeAnimation
  }
}
</script>
<style lang="scss" scoped>
.banner{
  height: 0;
  overflow: hidden;
  padding-bottom: 55%;
  position: relative;
  .banner-img{
    width: 100%;
  }
  .banner-info{
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    width: 100%;
    background: linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,0.8));
    .banner-title{
      flex: 1;
      line-height: 0.4rem;
      height: 0.4rem;
      color: #fff;
      font-size: 0.32rem;
      padding: 0.2rem;
      margin-right: .2rem;
    }
    .banner-number{
      height: .2rem;
      line-height: .2rem;
      color: #fff;
      padding: 0.1rem 0.2rem;
      margin-top: .2rem;
      background: rgba(0,0,0,0.5);
      border-radius: .2rem;
      .banner-icon{
        font-size: .24rem;
        margin-right: 0.1rem;
      }
    }
  }
}
</style>
